package com.atguigu.stgy.admin.controller;

import com.atguigu.stgy.admin.service.ProvinceInfoService;
import com.atguigu.stgy.model.entity.ProvinceInfo;
import com.atguigu.stgy.admin.service.impl.ProvinceInfoServiceImpl;
import com.atguigu.stgy.model.result.R;
import io.swagger.v3.oas.annotations.Operation;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.*;

import java.util.List;


@RestController
@RequestMapping("/admin/region/province")
public class ProvinceInfoController {
@Resource
    private ProvinceInfoService provinceInfoService;



    @Operation(summary = "查询所有省")
    @GetMapping("list")
    //    http://localhost:8080/admin/region/province/list
    public R<List<ProvinceInfo>> list() {
        return R.ok(provinceInfoService.list());
    }
}

